package com.cxp.serverdemo.common;

import com.cxp.serverdemo.bean.sys.bean.User;
import org.springframework.security.core.context.SecurityContextHolder;

public class CommonUtils {

    public static User getCurrentUser() {
        return (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }

}
